import Layout from '@/layout'

const systemRouter = {
  path: '/system',
  component: Layout,
  redirect: 'noRedirect',
  alwaysShow: true,
  name: 'System',
  meta: {
    title: '系统管理',
    roles: ['admin']
  },
  children: [
    {
      path: 'gateway-account-list',
      component: () => import('@/views/system/gateway-account-list'),
      name: 'SystemGatewayAccountList',
      meta: { title: '网关账号', noCache: false }
    },
    {
      path: 'gateway-account-detail/:id(\\d+)',
      component: () => import('@/views/system/gateway-account-detail'),
      name: 'SystemGatewayAccountDetail',
      meta: { title: '网关账号详情', noCache: true, activeMenu: '/system/gateway-account-list' },
      hidden: true
    },
    {
      path: 'data-dictionary-list',
      component: () => import('@/views/system/data-dictionary-list'),
      name: 'SystemDataDictionaryList',
      meta: { title: '数据字典', noCache: false }
    },
    {
      path: 'data-dictionary-detail/:id(\\d+)',
      component: () => import('@/views/system/data-dictionary-detail'),
      name: 'SystemDataDictionaryDetail',
      meta: { title: '数据字典详情', noCache: true, activeMenu: '/system/data-dictionary-list' },
      hidden: true
    }
  ]
}

export default systemRouter
